package com.woniu.outlet.dao;

import com.woniu.outlet.po.Equipment;
import com.woniu.outlet.po.EquipmentExample;
import java.util.List;

import com.woniu.outlet.po.EquipmentStop;
import org.apache.ibatis.annotations.*;

public interface EquipmentMapper {
    long countByExample(EquipmentExample example);

    int deleteByExample(EquipmentExample example);

    int deleteByPrimaryKey(Long id);

    int insert(Equipment record);

    int insertSelective(Equipment record);

    List<Equipment> selectByExample(EquipmentExample example);

    Equipment selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") Equipment record, @Param("example") EquipmentExample example);

    int updateByExample(@Param("record") Equipment record, @Param("example") EquipmentExample example);

    int updateByPrimaryKeySelective(Equipment record);

    int updateByPrimaryKey(Equipment record);

    //删除设备报停(根据设备编码)
    @Delete("delete from erp_equipment_stop where equipment_no = #{equipmentNo}")
    void deleteEquipmentStopByEquipmentNo(String equipmentNo);

    @Select("select * from erp_equipment where equipment_no = #{equipmentNo}")
    EquipmentStop selectEquipmentByEquipmentNo(String equipmentNo);
}